<?php
require_once("dao/DAOFactory.php");
require_once("bizlayer/IBiz.php");
require_once("model/ImageFile.php");

class VenueMgmt implements IBiz{
	static $dao;
	public static function initializeDao(){
		self::$dao = DAOFactory::getDAO("venue");
	}
	
	
	public static function searchVenues($venueId,$venueName,$city){
		self::initializeDao();
		return self::$dao->readList($venueId,$venueName,$city);
	}
	
	public static function getAllVenues(){
		return self::searchVenues(null, null, null);
	}
	
	public static function getVenueById($venueid){
		self::initializeDao();
		return self::$dao->getItem($venueid);
	}
	
	public static function getVenuePhoto($venueid){
		self::initializeDao();
		return self::$dao->getPhoto($venueid);
	}
	
	public static function updateVenue($venue){
		self::initializeDao();
		self::$dao->saveItem($venue);
	}
	
	public static function updatePhoto($venueid,$venueImgFile){
		self::initializeDao();
		
		self::$dao->updatePhoto($venueid, $venueImgFile);
	}
}
?>